<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta charset="utf-8" />
		<title>${langMap['lang.global.common.web.name']!}</title>
		<meta http-equiv="X-UA-Compatible" content="IE=Edge">
		<meta name="description" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />

	    <!-- basic styles -->
		<link rel="stylesheet" href="${ctx}/page/common/css/bootstrap/bootstrap.min.css" type="text/css"/>
		<link rel="stylesheet" href="${ctx}/page/common/css/font-awesome.min.css" />
		
		<!--[if IE 7]>
		  <link rel="stylesheet" href="assets/${ctx}/css/font-awesome-ie7.min.css" />
		<![endif]-->

		<!-- page specific plugin styles -->
		
		<link rel="stylesheet" href="${ctx}/page/common/css/jquery.gritter.css" />
		<link rel="stylesheet" href="${ctx}/page/common/css/ui-lightness/jquery-ui-1.10.4.min.css" />
		<link rel="stylesheet" href="${ctx}/page/common/css/venus/venus_core_ui.css" />
		
		<link rel="stylesheet" href="${ctx}/page/common/css/bootstrap-paginator-lui.css" type="text/css" />

		<!-- fonts 
		<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" />
		-->
		<!-- ace styles -->

		<link rel="stylesheet" href="${ctx}/page/common/css/ace.min.css" />
		<link rel="stylesheet" href="${ctx}/page/common/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="${ctx}/page/common/css/ace-skins.min.css" />
		
		<!--[if lte IE 8] ${ctx}/css/ace-ie.min.css>
		  <link rel="stylesheet" href="" />
		<![endif]-->

		<!-- inline styles related to this page -->
		
		<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

		<!--[if lt IE 9]> <![endif]-->
		<script src="${ctx}/page/common/js/html5shiv.js"></script>
		<script src="${ctx}/page/common/js/respond.min.js"></script>
		
		
		<!-- ace settings handler -->

		<script src="${ctx}/page/common/js/jquery.min.js"></script>
		<script src="${ctx}/page/common/js/venus/venus_core_admin.js"></script>
		<script src="${ctx}/page/common/js/bootstrap/bootstrap.min.js"></script>
		<script src="${ctx}/page/common/js/bootbox.min.js"></script>
		<script src="${ctx}/page/common/js/jquery.gritter.min.js"></script>
		<script src="${ctx}/page/common/js/ace-extra.min.js"></script>
		<script src="${ctx}/page/common/js/ace-elements.min.js"></script>
		<script src="${ctx}/page/common/js/ace.min.js"></script>
		<script src="${ctx}/page/common/js/bootstrap-paginator-lui.js"></script>
		<script src="${ctx}/page/common/js/spin.min.js"></script>
		<script src="${ctx}/page/common/js/jquery.placeholder.js"></script>
		<script src="${ctx}/page/common/js/jquery-ui-1.10.4.min.js"></script>
		<script src="${ctx}/page/common/js/jquery.validate.min.js"></script>
		
	</head>



	<body>
		
		
		<#include "/page/manager/main/top.html" />

		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<div class="main-container-inner">
				
				
				<#include "/page/manager/main/left.html" />

				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>

						<ul class="breadcrumb">
							<li>
								<span id="span_menuOneLevel">管理</span>&nbsp; &gt; &nbsp;<span id="span_menuTwoLevel">首页</span>
							</li>
						</ul><!-- .breadcrumb -->
                        <!-- -->
						<div class="nav-search" id="nav-search">
							<form class="form-search">
							 <i class="glyphicon glyphicon-exclamation-sign red"></i>
								<span class="font-face blue">
									欢迎来到东盛电子商务平台
								</span>
							</form>
						</div><!-- #nav-alert -->
					</div>
				<form id="form_query" action="${ctx}/goods/getGoodsList" method="post">
					<div class="page-content">
						<div class="row">
							<div id="vf_loadRight" class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
                                    <div class="widget-body">
									</div>
                                    <div class="widget-body  col-xs-12">
										<div id="div_condition_search" class="widget-main row">
											<div class="col-xs-8 pull-left">
												<input type="text" id="brand" name="brand" value="${brand!}" class="" placeholder="手机品牌" />
												<input type="text" id="model" name="model" value="${model!}" class="" placeholder="手机型号" />
												
												<a id="a_condition_search" href="javascript:void(0);" class="btn btn-sm btn-info" onclick="condition_search('${ctx}/goods/getGoodsList')">
														<i class="glyphicon glyphicon-search"></i> ${langMap['lang.global.common.button.query']}
												</a>
											</div>	
											<div class="col-xs-4 pull-right">
											    <#if session.master.manager=='1'>
												<a href="${ctx}/goods/gotoSave" class="btn btn-sm btn-info pull-right" openMode="rightPage"> 
													<i class="glyphicon glyphicon-plus bigger-110"></i>
													${langMap['lang.global.common.button.add']}
												</a>
												<a href="${ctx}/goods/gotoImportGoods" class="btn btn-sm btn-info" openMode="rightPage"> 
													<i class="glyphicon glyphicon-import bigger-110"></i>
													${langMap['lang.global.common.button.import']}
												</a>
											
											</#if>
										  </div>
										</div>
									</div>
									
									<!-- 列表开始 -->
									<div class="table-responsive">
										<table id="wew" name="wew" class="table table-striped table-bordered table-hover full-left" >
										<!-- 
										   <thead>
											   <tr>
											    -->
											   <!-- 
											        <th class="center" style="width:1px;"><input type="checkbox" class="ace" onclick="checkboxSelectAll(this)"/> <span class="lbl"></span></th>
											         -->
											         <!-- 
											        <#list headMap.keySet() as mkey>
												   		<th>${headMap.get(mkey)}</th>
											   	    </#list>
											   	    <th>${langMap['lang.global.common.table.operate']}</th>
											   </tr>
										   </thead>
										    -->
										   <tbody>
											   <#list pageObj as obj>
												   <#if obj_index%3==0>
												   	<tr id="ttttextrrrr_${obj['goodsid']}" >
											    	</#if>
												   <!-- 
												       <td class="center checked">
												          	<label>
												          		<input id="master_obj_${obj['goodsid']}" type="checkbox" class="ace"/>
												          		<span class="lbl"></span>
														    </label>
													   </td>
													    -->
													   <td style="font-size:12px;">
													    <#list headMap.keySet() as mkey>
													        <#if mkey=='pirce'>
													        	<!-- <td class="col-xs-${(2/headMap.size())?int}"></span> ${obj[mkey]!}￥</td> -->
													        	 ${obj[mkey]!}￥
													        <#elseif mkey=='stock'>
													        	<#if (obj[mkey]!)== '0'>
													        		<span class="red"><i class="glyphicon glyphicon-warning-sign"></i></span>缺货
													        	<#else>
													        		有货
													        	</#if>
										   			    	<#else>
										   			    		<#if (obj[mkey]!)?length lt 6>   
																	${obj[mkey]!}
																<#else> 
																     ${obj[mkey][0..10]}...
																</#if>
											   			    </#if>
											   	 	   </#list>
									   			    </td>
											   	 	   
											   	 	   <td>
														<div style="5%;">
															<#if session.master.manager=='1'>
															<a id="mas_" class="green" href="${ctx}/goods/gotoUpdate/${obj.goodsid!}" openMode="rightPage" title="修改">
																<i class="glyphicon glyphicon-pencil bigger-130" ></i>
															</a>
															<a id="mas_list_del" class="red" href="javascript:void(0);" title="删除" onclick="if(confirm('确定要删除吗？')){ajaxRefresh('${ctx}/goods/deleteGoods/${obj.goodsid!}','${ctx}/goods/getGoodsList');}">
																<i class="glyphicon glyphicon-trash bigger-130" ></i>
															</a>
															</#if>
															<!-- 后续扩展的操作按钮 -->
															<#if (obj['stock']!)!= '0'>
															<input id="min_${obj['goodsid']}" goodsid="${obj['goodsid']}" onClick="" type="button" value="-"  style="height:20px;"/>  
															<input id="text_box_${obj['goodsid']}" name="pirce_sum" pirce="${obj['pirce']}" size="1" type="text" value="1"  style="height:20px;"/>  
															<input id="add_${obj['goodsid']}" goodsid="${obj['goodsid']}" type="button" value="+"  style="height:20px;"/>  
															<!-- 总价：<label id="total_${obj['goodsid']}"></label>  -->
															<a id="buyGoods_${obj['goodsid']}" class="blue" style="cursor:pointer;" goodsid="${obj['goodsid']}"  openMode="rightPage" title="加入购物车">
																<i class="glyphicon glyphicon-saved" ></i>
															</a>
															</#if>
														</div>
													</td>
										   	 	   <#if obj_index%3==2>
													</tr>
												</#if>
											   </#list>
										   </tbody>
										</table>
									</div>
									<!-- 列表结束 -->
								<!-- PAGE CONTENT ENDS -->
								</div>
							</div><!-- /.col -->
						</div><!-- /.row -->
						</form>
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->

				
			</div><!-- /.main-container-inner -->

		</div><!-- /.main-container -->
	</body>
<#include "/page/common/venus_lang_zh_CN.html" />
<script type="text/javascript">
$(function(){  
	$("#span_menuTwoLevel").html("手机报价");
	$('input, textarea').placeholder();
	//$("#shoppingsum").text(${shoppingsum!});
    $("input[id*='add']").click(function(){
    	var goodsid = $(this).attr("goodsid");
	    var t = $("#text_box_"+goodsid);
    	t.val(parseInt(t.val())+1);
        //setTotal(goodsid,t);  
    })  
    $("input[id*='min']").click(function(){
    	var goodsid = $(this).attr("goodsid");
	    var t = $("#text_box_"+goodsid);
    	var num = parseInt(t.val())-1;
        if(num>=0){
        	t.val(num);
            //setTotal(goodsid,t);  
        }
    })  
    function setTotal(goodsid,t){
    	var pirce = t.attr("pirce");
        $("#total_"+goodsid).html((parseInt(t.val())*pirce).toFixed(2));  
    }  
    //setTotal();  
    
    $("a[id*='buyGoods']").click(function(){
    	var goodsid = $(this).attr("goodsid");
	    var _num = $("#text_box_"+goodsid).val();
	    var _pirce = $("#text_box_"+goodsid).attr("pirce");
	    
	    document.getElementById('form_query').action='${ctx}/goods/saveShop?goodNum='+_num+'&pirce='+_pirce+'&goodsId='+goodsid;
		ajaxSubmitAndRefresh('form_query','${ctx}/goods/getGoodsList');
    })  
})
</script>
<script language="JavaScript">
<!-- Hide
function killErrors() {
return true;
}
window.onerror = killErrors;
// -->
</script>
</html>